package com.yeyks.dal.domain;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户账单明细表
 *
 * @author 
 */
@Data
public class UserBill implements Serializable {
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 操作金额
     */
    private Long operatorAmount;

    /**
     * 当前账户余额
     */
    private Long avaliableAmount;

    /**
     * 备注
     */
    private String remark;

    /**
     * 账单类型：1 充值 2 佣金 3、提现 4、消费
     */
    private Integer type;

    /**
     * 创建日期
     */
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public static enum Type {
        PAY(1, "充值"),
        COMMSION(2, "佣金"),
        WITHDRAW(3, "提现"),
        CONSUME(4, "消费");
        int value;
        String desc;

        Type(int value, String desc) {
            this.value = value;
            this. desc = desc;
        }

        public Integer value() {
            return this.value;
        }

        public String desc() {
            return this.desc;
        }
    }

}